<div class="form_body" id="{{$id}}">
    {{ $slot }}
</div>
<div {{ $attributes->class('form_button') }}>
    <div class="layui-form-item" style="margin-bottom: 0;text-align: center;">
        {{ $button }}
    </div>
</div>
@if($mode=='popup')
    @push('script')
        <script type="text/javascript">
            layui.use(['form'], function () {
                function form_body_size() {
                    {{--layui.$("#{{$id}}").height(layui.$("#{{$id}}").parents('.layui-layer-content').height() - {{$height}} - {{$offset}});--}}
                    layui.$("#{{$id}}").height(layui.$(window).height()   - {{$height}} - {{$offset}});
                }

                layui.$(window).resize(form_body_size);
                form_body_size();
            });
        </script>
    @endpush
@endif
